// 2025/09/22
// Author: Forever
#include <bits/stdc++.h>
using namespace std;

int n;
char c[300005];
double f, cnt;

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> c + 1;
    for (int i = 1; i <= n; i++) {
        if (c[i] == 'o'){
            f += 2 * cnt + 1;
            cnt++;
        }
        else if (c[i] == 'x'){
            cnt = 0;
        }
        else {
            f += cnt + 0.5;
            cnt = (cnt + 1) / 2;
        }
    }
    cout << fixed << setprecision(4) << f << endl;
    return 0;
}